﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations;

namespace Sunlit.House.Articles.Dto
{
    [AutoMapTo(typeof(News))]
    public class CreateNewsInput
    {
        /// <summary>
        /// 标题最大长度
        /// </summary>
        public const int MaxTitleLength = 256;
        /// <summary>
        /// 新闻简介最大长度
        /// </summary>
        public const int MaxShortLength = 256;
        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [StringLength(MaxTitleLength)]
        public string Title { get; set; }
        /// <summary>
        /// 首页显示
        /// </summary>
        public bool ShowOnHome { get; set; }
        /// <summary>
        /// 是否转载
        /// </summary>
        public bool IsReprint { get; set; }
        /// <summary>
        /// 幻灯片中显示
        /// </summary>
        public bool InSlider { get; set; }
        /// <summary>
        /// 转载地址
        /// </summary>
        public string ReprintUrl { get; set; }
        /// <summary>
        /// 转载自
        /// </summary>
        [StringLength(64)]
        public string ReprintFrom { get; set; }

        /// <summary>
        /// 点击量
        /// </summary>
        public int Hits { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int DisplayOrder { get; set; }
        /// <summary>
        /// 图片链接
        /// </summary>
        public string ImageUrl { get; set; }
        /// <summary>
        /// 新闻简介
        /// </summary>
        [StringLength(MaxShortLength)]
        public string Short { get; set; }
        /// <summary>
        /// 新闻内容
        /// </summary>
        [Required]
        public string Content { get; set; }
        /// <summary>
        /// 新闻类别ID
        /// </summary>
        public int NewsCategoryId { get; set; }
    }
}
